package com.yykj.backstage.all.controller;

import com.yykj.backstage.all.dto.HospitalAgreementSearchDTO;
import com.yykj.backstage.all.model.entity.HospitalAgreement;
import com.yykj.backstage.all.service.HospitalAgreementService;
import com.yykj.common.vo.ResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/proto/api/agreement")
@Api(tags = "协议与隐私")
@SuppressWarnings(value = "unchecked")
public class ProtoHospitalAgreementController {

    @GetMapping("/view")
    @ApiOperation("查看")
    public ResultVO<HospitalAgreement> viewHospitalAgreement(HospitalAgreementSearchDTO searchDTO) {
        return ResultVO.success(service.viewHospitalAgreement(searchDTO));
    }

    private HospitalAgreementService service;

    @Autowired
    public void setService(HospitalAgreementService service) {
        this.service = service;
    }

}
